{% extends 'index.html' %}

{% block center %}
    <div id="page">

        <div id="p1">

        <!-- NUOVE AZIENDE -->
        <div class="aziende_title">
        <!--{if ($region != "") && ($categoryid != "") }-->
            <!--{sql_get_categorydenomination var="_arrCategoryDenomination" id="$categoryid" }-->
            Regione: <!--{$region}--> - Categoria: <!--{$_arrCategoryDenomination.category}--> / <!--{$_arrCategoryDenomination.subcategory}-->
        <!--{elseif $categoryid != "" }-->
            <!--{sql_get_categorydenomination var="_arrCategoryDenomination" id="$categoryid" }-->
            Categoria: <!--{$_arrCategoryDenomination.category}--> / <!--{$_arrCategoryDenomination.subcategory}-->
        <!--{elseif $region != "" }-->
            Regione: <!--{$region}-->
        <!--{elseif $searchkey != "" }-->
            Risultati ricerca: <!--{$searchkey}-->
        <!--{else}-->
            Ultime aziende
        <!--{/if}-->
        </div>

        <!--{if $region != "" }-->
            <div id="second-search">
                Specifica la categoria:
                <form action="company_list" method="get">
                <select name="categoryid" onchange="this.form.submit();">
                <option value="">-- Selezionare --</option>

                    <!--{if $categoryid == $_arrCategory[_categoryitem].subcategoryid }-->
                        <option value="<!--{$_arrCategory[_categoryitem].subcategoryid}-->" selected="selected" >
                            <!--{$_arrCategory[_categoryitem].category}-->&nbsp;/&nbsp; <!--{$_arrCategory[_categoryitem].subcategory}-->
                        </option>
                    <!--{else}-->
                        <option value="<!--{$_arrCategory[_categoryitem].subcategoryid}-->">
                            <!--{$_arrCategory[_categoryitem].category}-->&nbsp;/&nbsp; <!--{$_arrCategory[_categoryitem].subcategory}-->
                        </option>
                    <!--{/if}-->

                </select>
                <input type="hidden" name="region" value="<!--{$region}-->" />
                </form>
            </div>
        <!--{/if}-->

        <!--{sql_get_companies var="_arrCompany" count="$item_step" offset="$first_id" categoryid="$categoryid" region="$region"  searchkey=$searchkey items_count="_companiescount"}-->
        <!--{section name=_companyitem loop=$_arrCompany}-->
        {% for azi in pageData["compcatelist"] %}
        <div class="azienda">
            <div class="azienda-center">
                {% if azi.compa.imagepath != "" %}
                <img src="/templates/company_img/{{azi.compa.imagepath}}" alt="{{azi.compa.ensign}}" class="img_left" />
                {% else %}
                <img src="logo_vuoto.jpg" alt="{{azi.compa.ensign}}" class="img_left" />
                {% endif %}
                <a href="company_detail?id={{azi.id_company}}" class="aziende_link">{{azi.compa.ensign}}</a> - <strong>{{azi.compa.address}} / {{ azi.compa.city}}</strong>
                <br />{{ azi.compa.abstract}}
                <div class="company_click" >Azienda vista <span style="color: #ff5400;">{{azi.compa.clicks}}</span> volte</div>

            </div>
        </div>
        <div class="tratteggio_blue" ></div>
        <br />
        {% endfor %}

        <div id="nav">
            <br />
            <hr class="hr_blue" />
            <!--<b><a href="#" class="aziende_link">Sottocategoria A1</a></b>&nbsp;&nbsp;&nbsp;
            <b><a href="#">&#171; indietro</a></b>&nbsp;-->
            <!--{foreach from=$_arrPages item=curr_page}-->
                <!--{if $curr_page == $actual_page }-->
                    <strong>[&nbsp;<!--{$curr_page}-->&nbsp;]</strong>
                <!--{else}-->
                    <strong>
                    <!--{if ($region != "") && ($categoryid != "") }-->
                        <a href="company_list?FirstId=<!--{compute_firstid current_page=$curr_page item_step= $item_step}-->&amp;categoryid=<!--{$categoryid}-->&amp;region=<!--{$region|escape}-->"><!--{$curr_page}-->&nbsp;</a>
                    <!--{elseif $categoryid != "" }-->
                        <a href="company_list?FirstId=<!--{compute_firstid current_page=$curr_page item_step= $item_step}-->&amp;categoryid=<!--{$categoryid}-->"><!--{$curr_page}-->&nbsp;</a>
                    <!--{elseif $region != "" }-->
                        <a href="company_list?FirstId=<!--{compute_firstid current_page=$curr_page item_step= $item_step}-->&amp;region=<!--{$region|escape}-->"><!--{$curr_page}-->&nbsp;</a>
                    <!--{elseif $searchkey != "" }-->
                        <a href="company_list?FirstId=<!--{compute_firstid current_page=$curr_page item_step= $item_step}-->&amp;searchkey=<!--{$searchkey|escape}-->"><!--{$curr_page}-->&nbsp;</a>
                    <!--{else}-->
                        <a href="company_list?FirstId=<!--{compute_firstid current_page=$curr_page item_step= $item_step}-->"><!--{$curr_page}-->&nbsp;</a>
                    <!--{/if}-->
                    </strong>
                <!--{/if}-->
            <!--{/foreach}-->
            <!--<b class="aziende_link">1</b> -
            <b><a href="#.html">2</a></b> -
            <b><a href="#.html">3</a></b> -
            <b><a href="#.html">4</a></b>
            &nbsp;&nbsp;
            <b><a href="#"> avanti &#187;</a></b>-->
            <hr class="hr_blue" />
        </div>
        <!-- END NUOVE AZIENDE -->

        </div>

    </div>
 <!-- END PAGE -->
{% endblock %}
